#ifndef _YSH_H_
#define _YSH_H_

#include <unistd.h>

#define LINE_BUF_SIZE           (5120)
#define TOKEN_BUF_SIZE          (128)

#define PIPE_NUM                (1024)
#define PROG_ARGS_NUM           (512)
#define STRING_SIZE             TOKEN_BUF_SIZE

#define PATH_LEN                STRING_SIZE
#define JOB_NUM                 (2048)

#define TERM_FILEDES STDIN_FILENO
#define SUPERUSERNAME ("root")
#define HOME_DIRECTORY ("~")
//////////////////////////////////
//#define DEBUG                 //
#ifdef DEBUG                    //
extern void restore_back(void); //
#endif                          //
//////////////////////////////////
typedef enum Bool {
	FALSE = 0, TRUE = 1,
} Bool;

extern pid_t ysh_pid;

typedef struct String {
    char str[LINE_BUF_SIZE];
    int  len;
} String;
extern String prompt_string;

/*
 * Bibliography
 *
 * W. Richard Stevens, Advanced Programming in the UNIX Environment
 * The GNU C Library, http://www.gnu.org/s/libc/manual/html_code/index.html
 * The IEEE and The Open Group, The Open Group Base Specification Issue 6, IEEE Std 1003.1, 2004 Edition
 * Brian W. Kernighan, Dennis M.Ritchie, The C Programming Language
 * GDB QUICK REFERENCE, http://www.cc.gatech.edu/classes/cs4385_99_sprint/handouts/gdb.pdf
 * System Programming Practice: The Yalnix Shell, http://www.cs.cmu.edu/~gkesden/412-18/fall02/applications/projects/proj1/proj1.pdf
 * comp.lang.c Frequently Asked Questions, http://c-faq.com/index.html
 * Unix - Frequently Asked questions, http://www.faqs.org/faqs/unix-faq/contents/
 */

#endif

